package ooday01;

public class CarExercise02 {
    String brand; //品牌
    String model; //型号
    String color; //颜色
    double price; //价格
    char letter;  //类型

    CarExercise02(){

    }
    CarExercise02(String brand,String model,String color,double price,char letter){
        this.brand = brand;
        this.model = model;
        this.color = color;
        this.price = price;
        this.letter = letter;

    }
    CarExercise02(String brand,String model,double price){
        this.brand= brand;
        this.model= model;
        this.price = price;

    }
    void carPrice(){
        System.out.println("这辆车是"+brand+model+"它的价格是"+price);
    }
    void introduce(){
        System.out.println("这辆车的品牌型号是"+brand+model+","+color+"颜色的价格是"+price+"，它需要"+letter+"型驾照才可以驾驶");
    }
}
